package com.travelsky.app.security.manager;

import java.util.List;
import java.util.Set;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.travelsky.app.persistence.Resource;

public interface IResourceService {
	
	/**
	 * 查找所有的资源权限 use hibernate query cache
	 * 如果没有找到任何资源 返回空集合  
	 */
	@Transactional(
			propagation = Propagation.SUPPORTS,   
			isolation = Isolation.DEFAULT 
		)
	public List<Resource> findAllResources();
	
	/**
	 * 根据资源名列表查出资源 use hibernate query cache
	 * @param resurceValues
	 * @return 如果没有找到任何资源 返回空集合  SET
	 */
	@Transactional(
			propagation = Propagation.SUPPORTS,   
			isolation = Isolation.DEFAULT 
		)
	public Set<Resource> findResourceByValues(List<String> resurceValues);
}
